<?php
	session_start(); 

    if (!isset($_SESSION['is_logged_in'])) {
        header("Location:index.php?url=" . $_SERVER["REQUEST_URI"]);
        die();
    }
    else
    	include("php/conexion.php");
?>

<!doctype html>
<html lang="es">
<head>
	<meta charset="utf-8">

	<title>Super Guia</title>
	<meta name="description" content="Super Guia">
	<meta name="author" content="Vector-IT">
	<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
	
	<link rel="stylesheet" href="css/estilos.css">
	
	<script src="http://code.jquery.com/jquery-latest.js"></script>
	<script src="js/scripts.js"></script>
	  
	<script>
		function armarPagina() {
			cargarEncabezado(function(){});
		}
	</script>
</head>
	
<body onload="armarPagina();">
<!-- Ventanas modales -->
	<div id="divFondo" class="fondo" onclick="cerrarLogin();"></div>
	
	<div id="divConfirmacion" class="modal">
		<div class="tituloVentana">
			Acceder al sistema
			<input type="button" value="X" onclick="cerrarLogin();" class="boton" 
				style="color: black; position: absolute; left: 82%; top: 19px;" />
		</div>
		<div style="padding-top: 10px;">
			<form name="frmLogin" id="frmLogin" method="POST" onSubmit="return false;">
				<table>
					<tr>
						<td>
							<label for="txtUser">Usuario: </label>
						</td>
						<td>
							<input type="text" id="txtUser" required />
						</td>
					</tr>
					<tr>
						<td>
							<label for="txtPass">Contrase&ntilde;a: </label>
						</td>
						<td>
							<input type="password" id="txtPass" required />
						</td>
					</tr>
					<tr>
						<td colspan="2" style="text-align: right;">
							<div id="divLoginError" class="error"></div>
							<input type="submit" value="Aceptar" onclick="login(location.href);" class="boton" style="color: black;" />&nbsp;<input type="button" value="Cancelar" onclick="cerrarLogin();" class="boton" style="color: black;" />
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
	
<!-- Contenido de la pagina -->
	
	<div class="tituloPrincipal">Super Guia - Negocios</div>

	<div id="divEncabezado">
		<img src="imagenes/spinner.gif" style="width: 16px; height: 16px;" />Actualizando...
	</div>
	
</body>
</html>